package org.foliage.rcp.ui.internal.proxy;

import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.ScrollBar;

public class ScrollBarProxy implements IScrollBarProxy {

	private ScrollBar scrollBar;

	public ScrollBarProxy(ScrollBar scrollBar) {
		this.scrollBar = scrollBar;
	}

	public int getIncrement() {
		return scrollBar.getIncrement();
	}

	public int getMaximum() {
		return scrollBar.getMaximum();
	}

	public int getMinimum() {
		return scrollBar.getMinimum();
	}

	public int getPageIncrement() {
		return scrollBar.getPageIncrement();
	}

	public int getSelection() {
		return scrollBar.getSelection();
	}

	public int getThumb() {
		return scrollBar.getThumb();
	}

	public boolean getVisible() {
		return scrollBar.getVisible();
	}

	public void setIncrement(int value) {
		scrollBar.setIncrement(value);
	}

	public void setMaximum(int value) {
		scrollBar.setMaximum(value);
	}

	public void setMinimum(int value) {
		scrollBar.setMinimum(value);
	}

	public void setPageIncrement(int value) {
		scrollBar.setPageIncrement(value);
	}

	public void setSelection(int selection) {
		scrollBar.setSelection(selection);
	}

	public void setThumb(int value) {
		scrollBar.setThumb(value);
	}

	public void setValues(int selection, int minimum, int maximum, int thumb, int increment, int pageIncrement) {
		scrollBar.setValues(selection, minimum, maximum, thumb, increment, pageIncrement);
	}

	public void setVisible(boolean visible) {
		scrollBar.setVisible(visible);
	}

	public void handleMouseWheel(Event e) {
		//do nothing        
	}

	public void addSelectionListener(SelectionListener listener) {
		scrollBar.addSelectionListener(listener);
	}

	public void removeSelectionListener(SelectionListener listener) {
		scrollBar.removeSelectionListener(listener);
	}
	
}
